home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
Apps
/
Utilities
/
Hardware
/
SCSItools
/
setmtd.c
< prev
Wrap
C/C++ Source or Header
|
1992-12-26
|
599b
|
31 lines
/*
* setmtd - set SCSI tape driver to a fixed block size
* by John L. Chmielewski
* Tue Feb 19, 1991
*/
#include <fcntl.h>
#include <sys/types.h>
#include <nextdev/scsireg.h>
#define RSTDEVICE "/dev/rst0"
#define BLOCKSIZE 512
main()
{
int fd, size = BLOCKSIZE;
if ((fd = open(RSTDEVICE, O_RDWR)) < 0)
{
perror(RSTDEVICE);
exit(1);
}
if (ioctl(fd, MTIOCFIXBLK, &size) < 0)
{
perror("ioctl");
exit(1);
}
(void) close(fd);
return 0;
}